-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add client-set proxy headers to PDS #2251
Conversation
Nice, so this will allow clients to easily hook into custom AppViews for non-Bluesky use-cases? 👀 |
Yup yup exactly! This is actually needed for the composable mod services feature we're working on, but it will also allow a client to configuring a different appview to communicate with. Unfortunately it still only works for |
ctx: AppContext, | ||
path: string, | ||
): { url: string; did: string } | null => { | ||
const nsid = path.replace('/xrpc/', '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few misc things to maybe just peek at here:
- Do we need to check that the path starts with
/xrpc
too? - May want to handle trailing slash in the URL, I believe the pds routing permits it.
- Express's
req.url
is relative to the nearest router or something like that, I forget the details but may be relevant since I know it gets passed here. There is alsoreq.originalUrl
which might be more reliable for us.
add runit to the services/bsky Dockerfile
* Allow tags to lead with and contain only numbers * Break tags on other whitespace characters * Export regexes from rich text detection * Add test * Add test * Disallow number-only tags * Avoid combining enclosing screen chars * Allow full-width number sign * Clarify tests * Fix punctuation edge case * Reorder * Simplify, add another test * Another test, comment
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* ozone delegates email sending to user's pds * lexicon: add content field to mod email event * test email sending via mod event
Add the ability to set an
atproto-proxy
header to a request to inform a PDS where it should forward that message to (with service auth). Currently only works for specced methods.The syntax is
atproto-proxy: ${did}#${serviceId}
. For instance:atproto-proxy: did:web:api.bsky.app#bsky_appview
.When unset, the request falls back to the current PDS configuration